<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>搜索用户</title>
		<script src="../js/jquery3.5.1.js"></script>
		<script src="../js/vue.js"></script>
		<script src="../js/axios.min.js"></script>
		<script src="../js/elementui.js"></script>
		<script src="../js/common.js"></script>
		<script src="../js/mine.js"></script>
		<link rel="stylesheet" href="../css/index.css" />
		<link rel="stylesheet" href="../css/myvideo.css" />
		<link rel="stylesheet" href="../css/searchVideo.css" />
		<link rel="stylesheet" href="../css/searchUser.css" />
		<link href="../layui/css/layui.css" rel="stylesheet">
	</head>
	<body>
		<div id="app">
		<div id="searchTop">
				<ul>
					<li><a style="color: white;"  href="searchVideo.html">视频</a></li>
					<li><a style="color: #FF1493;" href="#">用户</a></li>
				</ul>
			</div>
			<div id="max">
				
			<template v-for="obj in userInfo">
				<div @click="intoUser(obj)" id="searchuser">
				<img class="imguser" :src="obj.headImg"/>
				<div class="username">{{obj.userName}}</div>
				<button style="visibility:hidden" class="but">关注</button>
				<div class="userinfo">
					<div class="usernum">
						逗比号:{{obj.userAccount}}
						<!-- &nbsp;&nbsp;&nbsp;<span class="yi">|</span>
						114获赞
						&nbsp;&nbsp;&nbsp;<span class="yi">|</span>
						10粉丝 -->
					</div>
					<div class="usertext">
						{{obj.synopsis}}
					</div>
				</div>
				</div>
			</template>
			
			</div>
		</div>
	</body>
	<script>
		new Vue({
			el:"#app",
			data:{
				userInfo:''
			},methods:{
				initData(){
					let searhMag=window.sessionStorage.getItem("searchMag")
					let userid=window.sessionStorage.getItem("userid")//用户id
					axios.get(API+"selectUser?searhMag="+searhMag).then(res=>{
						this.userInfo=res.data
					})
				},intoUser(obj){
					let fid = window.localStorage.setItem("userIdOther",obj.userId);
					//查看主页
					location.href="../mine/attention.html"
				}
			},mounted(){
				this.initData();
			}
		})
	</script>
	<script type="text/javascript">
		
		// $(".but").click(function(){
		// 	alert("?")
		// 	$(this).toggleClass("buth")
		// })
	</script>
</html>
